import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../widgets/custom_list/loading_list_state_view.dart';

class CustomErrorWidget extends StatelessWidget {
  Function click;
  CustomErrorWidget({
    Key? key,
    required this.click,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        color: Colors.white,
        child: LoadingListStateView(
          'images/lt_common/no_data.png',
          '网络开小差了，点击重试~',
        ),
        width: Get.width,
        height: Get.height,
        alignment: Alignment.center,
      ),
      onTap: () {
        click();
      },
    );
  }
}
